#include <iostream>
#include <algorithm>
#include <string>
#include <vector>

using namespace std;

struct Person
{
    string name;
    int age;
};

bool compare_by_age(const Person &p1, const Person &p2)
{
    return p1.age < p2.age;
}
int main()
{

    vector<Person> v = {{"Alice", 20}, {"Bob", 30}, {"Charlie", 25}};
    sort(v.begin(), v.end(), compare_by_age); // 按年龄升序排序
    // 现在v为{{"Alice", 20}, {"Charlie", 25}, {"Bob", 30}}
    for (int i = 0; i < v.size(); i++)
    {
        cout << v[i].name << endl;
    }

    for (int i = 0; i < 5; i++)
    {
        for(int j = 0; j< 5; j++)
        {
            cout << i << ", " << j << endl;
        }
    }
}